package org.flashbrighton.as3bots.models
{
	import org.flashbrighton.as3bots.logic.IBotLogic;
	
	public class BotModel
	{
		public static const COLLIDABLE_TYPE:String = CollidableType.BOT;
		
		private var _logic:IBotLogic;
		private var _energy:Number;
		private var _name:String;
		private var _radius:Number;
		
		public var colour:uint;
		
		/**
		 * Constructor.
		 * 
		 * @param logic The 'brain' of the bot.
		 */
		public function BotModel(logic:IBotLogic)
		{	
			_logic = logic;
			initValues();
		}

		
		private function initValues():void
		{
			_energy = 1000;
		}
	
		
		public function get logic():IBotLogic
		{
			return _logic;
		}

		
		public function get enginePercent():Number
		{
			return _logic.enginePercent;
		}
		
		
		public function get rotatorPercent():Number
		{
			return _logic.rotatorPercent;
		}
		
		
		public function get energy():int
		{
			return _energy;
		}
		
		
		public function set energy(val:int):void
		{
			_energy = val;
		}
		
		
		public function get name():String
		{
			return _name;
		}
		
		
		public function set name(str:String):void
		{
			_name = str;
		}
		
		
		public function get radius():Number
		{
			return _radius;
		}
		
		
		public function set radius(val:Number):void
		{
			_radius = val;
		}
		
	}
}